import VueRouter from 'vue-router';

// 导入对应的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewsList from './components/news/newlist.vue'
import NewsinFo from './components/news/newsinfo.vue'
import goodlist from './components/Goods/goodlist.vue'
import goodlistinfo from './components/Goods/goodlistinfo.vue'

var router = new VueRouter ({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newlist',component:NewsList},
        {path:'/home/newlist/newsinfo/:id',component:NewsinFo},
        {path:'/home/goodlist',component:goodlist},
        {path:'/home/goodlistinfo/:id',component:goodlistinfo}
    ],
    linkActiveClass:'mui-active', // 设置切换图标高亮
})

// 暴露路由
export default router;